<template>
  <div class="col-xs-offset-2 col-xs-8">
    <div class="page-header">
      <h2>Vue Router Demo</h2>
      <button @click="back">后退</button>
      <button @click="forward">前进</button>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Banner',
  methods: {
    back() {
      this.$router.back()
      // this.$router.go(2)// 2:代表后退2步，-2:代表前进2步
    },
    forward() {
      this.$router.forward()
    }
  }
}
</script>

<style lang="scss" scoped></style>